package net.gazhi.delonix.rbac.service;

import java.util.List;

import org.hibernate.criterion.Order;
import org.springframework.stereotype.Service;

import net.gazhi.delonix.core.jpa.AbstractEntityService;
import net.gazhi.delonix.rbac.entity.Group;
import net.gazhi.delonix.rbac.entity.Role;

@Service
public class GroupService extends AbstractEntityService<Group> {

	/**
	 * 列出所有 Action
	 * 
	 * @return
	 */
	@SuppressWarnings("unchecked")
	public List<Role> listAll() {
		return (List<Role>) createCriteria().addOrder(Order.asc("id")).list();
	}

}
